<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/11/30
 * Time: 11:02
 */

namespace vendor\core;

class order
{
    //2.4.2 类属性和方法，访问控制
    //类属性
    public $user_id;//公有
    protected $order_id;//保护 子类可继承
    private $order_type;//私有

    /**
     * @return mixed
     */
    //构造函数
    public function __construct($user_id,$order_id)
    {
        $this->user_id=$user_id;
        $this->order_id=$order_id;
    }

    //普通类方法
    public function create(){
        echo "创建成功";
    }

    //析构函数
    public function __destruct()
    {
        // TODO: Implement __destruct() method.
        echo "收尾结束";
    }
}